Conversation
12d5542 to
9da590b
Compare
globalchubby
left a comment
There was a problem hiding this comment.
Does there need to be a change in the README as well?
| 'The FSA spec mandates an action object with a type. Try using the createAction(s) method.' | ||
| ); | ||
|
|
||
| if (!includes(actionTypes, action.type.toString())) { |
There was a problem hiding this comment.
const {type: actionType} = actionor
const {type} = action|
We didn't made any changes when we added the check. The current README makes it pretty clear that |
9da590b to
afb556f
Compare
| } | ||
| })).to.deep.equal({ | ||
| counter: 0 | ||
| }); |
There was a problem hiding this comment.
Is there a chai assertion that we expect this code block not to throw? I think that's the point, and not that the state is reduced to a certain value.
There was a problem hiding this comment.
http://chaijs.com/api/bdd/#method_throw
.not.to.throw
There was a problem hiding this comment.
This reducer should not throw AND just return the state. Will change that.
afb556f to
ef4acb7
Compare
|
Please review again @yangmillstheory. |
|
Just have one last question: #168 (comment) |
|
Already answered and added :P |
|
Was this test failing before the application code changed? |
|
What do you mean exactly? |
|
If we removed the FSA check removal, then the test should fail (TDD) to eliminate false positives. Just wondering if that's the case |
|
The test I've wrote was failing when I've just removed the checks, because |
|
Great, thanks :) |
With #141 we have made other libraries incompatible with redux-actions and it resulted to an unexpected behavior (#164, #167). If an action is not a FSA, handleAction should not handle it and just pass it to the next reducer. This fix will remove the FSA check to support Non-FSA.
Closes #164, #167